package com.tymoshenko.seabattle.client.presenter;

import com.tymoshenko.seabattle.client.view.DashboardView;

/**
 * @author Yakiv Tymoshenko
 * @since 14.12.13
 */
public class NewGamePresenter implements DashboardView.NewGamePresenter {

    private DashboardView dashboardView;

    public NewGamePresenter(DashboardView dashboardView) {
        this.dashboardView = dashboardView;
        dashboardView.setNewGamePresenter(this);
    }

    public void startNewGame() {
        dashboardView.getShipPlacementPresenter().placeShips();
        ((ShootingPresenterImpl) dashboardView.getShootingPresenter()).startNewGame();
    }

    public DashboardView getDashboardView() {
        return dashboardView;
    }
}
